package thread.threetype.callable;

import java.util.concurrent.*;

public class Client {
    public static void main(String[] args){
        ExecutorService executorService = Executors.newSingleThreadExecutor();
        Future<User> future =  executorService.submit(new C());
        try {
            User user =   future.get();
            System.out.println("user:"+user.getName());
        } catch (InterruptedException e) {
            e.printStackTrace();
        } catch (ExecutionException e) {
            e.printStackTrace();
        }finally {
            executorService.shutdown();
        }
    }
}
